﻿

using UnityEngine;

namespace Gameplay.CharacterFramework
{
    [CreateAssetMenu(fileName = "NewArrowShoot", menuName = "Skills/NewArrowShoot")]
    public class ArrowShoot : Skill
    {
        public GameObject ArrowShootPrefab;

        public float Speed;

        private ProjectileEmitter _projectileEmitter;
        public override void Trigger()
        {
            base.Trigger();
            _projectileEmitter = new ProjectileEmitter(_user, ArrowShootPrefab);
            _projectileEmitter.Spwan(ArrowShootPrefab, _weaponManager.RightWeaponSlot);
        }
        public override void Use(Role user)
        {
            base.Use(user);
        }

        public override void Begin()
        {
            base.Begin();
            Debug.Log("技能开始");
        }
        public override void Finish()
        {
            base.Finish();
            _projectileEmitter.Shoot(_user.Direction,Speed);
        }

        
    }
}
